﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace UserModule
{
    public partial class FormUserManager : DevExpress.XtraEditors.XtraForm
    {
        public FormUserManager()
        {
            InitializeComponent();
        }

        private void FormUserManager_Load(object sender, EventArgs e)
        {
            textEditOperator.Text = UserManager.userSetting.strOperatorPW;
            textEditTechnician.Text = UserManager.userSetting.strTechPW;
            textEditEngineer.Text= UserManager.userSetting.strEngineerPW;
            textEditAdministrator.Text = UserManager.userSetting.strAdministatorPW;
            textEditDesigner.Text = UserManager.userSetting.strCodePW;
        }

        private void simpleButtonSave_Click(object sender, EventArgs e)
        {
            UserManager.userSetting.strOperatorPW= textEditOperator.Text;
            UserManager.userSetting.strTechPW= textEditTechnician.Text;
            UserManager.userSetting.strEngineerPW= textEditEngineer.Text;
            UserManager.userSetting.strAdministatorPW= textEditAdministrator.Text;
            UserManager.userSetting.strCodePW= textEditDesigner.Text;
            UserManager.userSetting.Save();
        }
    }
}